home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / quicktime / quicktime vr / vrscript / common files / fileutilities.h < prev    next >
Encoding:
Text File  |  2000-06-23  |  1.4 KB  |  80 lines

  1. //////////
  2. //
  3. //    File:        FileUtilities.h
  4. //
  5. //    Contains:    Some utilities for working with pathnames, files, and file specifications.
  6. //                All utilities start with the prefix "FileUtils_".
  7. //
  8. //    Written by:    Tim Monroe
  9. //
  10. //    Copyright:    © 1999 by Apple Computer, Inc., all rights reserved.
  11. //
  12. //    Change History (most recent first):
  13. //
  14. //       <1>         05/27/99    rtm        first file
  15. //     
  16. //////////
  17.  
  18. #pragma once
  19.  
  20. //////////
  21. //
  22. // header files
  23. //
  24. //////////
  25.  
  26. #ifndef __FileUtilities__
  27. #define __FileUtilities__
  28.  
  29. #ifndef __QTML__
  30. #include <QTML.h>
  31. #endif
  32.  
  33. #include <string.h>
  34. #include <stdlib.h>
  35.  
  36. #ifndef __URLUtilities__
  37. #include "URLUtilities.h"
  38. #endif
  39.  
  40.  
  41. //////////
  42. //
  43. // compiler flags
  44. //
  45. //////////
  46.  
  47.  
  48. //////////
  49. //
  50. // constants
  51. //
  52. //////////
  53.  
  54. #define kFileSuffixSeparator        (char)'.'        // file suffix separator
  55. #define kFileSuffixSepString        "."                // file suffix separator as a string
  56.  
  57.  
  58. //////////
  59. //
  60. // macros
  61. //
  62. //////////
  63.  
  64.  
  65. //////////
  66. //
  67. // function prototypes
  68. //
  69. //////////
  70.  
  71. OSErr                            FileUtils_MakeFSSpecForPathName (short theVRefNum, long theDirID, char *thePathName, FSSpec *theFSSpec);
  72. OSErr                            FileUtils_MakeFSSpecForAnyFileInDir (Str255 thePathName, FSSpecPtr theFileFSSpec);
  73.  
  74. static Boolean                    FileUtils_IsFullPathName (char *thePathName);
  75. char *                            FileUtils_GetBaseName (char *thePathName);
  76. char *                            FileUtils_ChangeFileNameSuffix (char *thePathName, char *theNewSuffix);
  77.  
  78.  
  79. #endif    // __FileUtilities__
  80.